﻿<UserControl x:Class="Shammateh.Win.UI.Controls.MainRibbon"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:r="http://schemas.microsoft.com/winfx/2006/xaml/presentation/ribbon"
             xmlns:local="clr-namespace:Shammateh.Win.UI" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="600">
    <UserControl.Resources>
        <Style TargetType="r:RibbonTabHeader">
            <Setter Property="Control.Background" Value="Transparent" />
        </Style>
    </UserControl.Resources>
    <Grid>
        <r:Ribbon Name="mainRibbon" BorderBrush="#FFB7BCC4">
            <r:Ribbon.ApplicationMenu>
                <r:RibbonApplicationMenu Background="#FFFEA920" BorderBrush="#FFE07110" />
            </r:Ribbon.ApplicationMenu>
            <r:Ribbon.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFE5E9EE" Offset="1" />
                    <GradientStop Color="White" Offset="0" />
                    <GradientStop Color="White" Offset="0.5" />
                </LinearGradientBrush>
            </r:Ribbon.Background>
            <r:RibbonTab Header="خانه">
                <r:RibbonGroup>
                    <r:RibbonSplitButton Label="بازخوانی"
                               LargeImageSource="/Shammateh;component/Images/Icons/refresh.png"
                               SmallImageSource="/Shammateh;component/Images/Icons/refresh.png" Command="{Binding RefreshCommand}" ToolTip="F5">
                        <r:RibbonMenuItem Header="بازخوانی همه"
                              ImageSource="/Shammateh;component/Images/Icons/refresh.png" Command="{Binding RefreshAllCommand}" ToolTip="Ctrl+F5" />
                    </r:RibbonSplitButton>
                </r:RibbonGroup>
                <r:RibbonGroup>
                    <r:RibbonSplitButton Label="خروج اطلاعات"
                               LargeImageSource="/Shammateh;component/Images/Icons/Export.png"
                               SmallImageSource="/Shammateh;component/Images/Icons/Export.png" Command="{Binding ExportCommand}"
                               CommandParameter="Excel">
                        <r:RibbonMenuItem Header="Excel" ImageSource="/Shammateh;component/Images/Icons/Excel.png"
                              Command="{Binding ExportCommand}" CommandParameter="Excel" />
                    </r:RibbonSplitButton>

                    <r:RibbonSplitButton Label="ورود اطلاعات"
                               LargeImageSource="/Shammateh;component/Images/Icons/Import.png"
                               SmallImageSource="/Shammateh;component/Images/Icons/Import.png" Command="{Binding ImportCommand}"
                               CommandParameter="Excel">
                        <r:RibbonMenuItem Header="Excel" ImageSource="/Shammateh;component/Images/Icons/Excel.png"
                              Command="{Binding ImportCommand}" CommandParameter="Excel" />
                    </r:RibbonSplitButton>
                </r:RibbonGroup>
                <r:RibbonGroup>
                    <r:RibbonButton Label="خروج" LargeImageSource="/Shammateh;component/Images/Icons/Logout.png"
                          SmallImageSource="/Shammateh;component/Images/Icons/Logout.png" Command="{x:Static local:App.SignOutCommand}">
                        <r:RibbonButton.MouseOverBackground>
                            <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                <GradientStop Color="#FFFEFBF4" Offset="0" />
                                <GradientStop Color="#FFFDCECE" Offset="0.19" />
                                <GradientStop Color="#FFFDB8B8" Offset="0.39" />
                                <GradientStop Color="#FFFF6B6B" Offset="0.39" />
                                <GradientStop Color="#FFFF9A9A" Offset="0.79" />
                                <GradientStop Color="#FFFFAAAA" Offset="1" />
                            </LinearGradientBrush>
                        </r:RibbonButton.MouseOverBackground>
                    </r:RibbonButton>
                </r:RibbonGroup>
            </r:RibbonTab>
        </r:Ribbon>
    </Grid>
</UserControl>